package com.gqmk.demo.springcloudfeign.controller;

import com.gqmk.demo.springcloudapi.domain.Demo;
import com.gqmk.demo.springcloudfeign.service.DemoFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/feign")
public class DemoFeignController {

    @Autowired
    private DemoFeignService demoFeignService;

    @GetMapping("demo")
    public Demo getDemo() {
        return demoFeignService.getDemo();
    }
}
